/**
 * 
 */

package com.chengyu.eyc.controller;

import java.util.Map;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import com.chengyu.eyc.enums.UserTypeEnums;
import com.chengyu.eyc.model.EycUser;

import io.swagger.annotations.ApiOperation;

@Controller
@RequestMapping("/page")
public class EycPageController {

    @ApiOperation("新增或修改商户列表")
    @GetMapping("addOrEditInspStation")
    public String addOrEditInspStation(Model model) {
        return "basedata/addOrEditInspStation";
    }
    
    @ApiOperation("轮播图配置")
    @GetMapping("configCarousel")
    public String configCarousel(@RequestBody(required = false) Map<String, Object> params) {
        return "basedata/configCarousel";
    }

    @ApiOperation("基础配置")
    @GetMapping("dataConfig")
    public String dataConfig(Model model) {
        return "basedata/dataConfig";
    }

    @ApiOperation("消息推送")
    @GetMapping("eycMessage")
    public String eycMessage(Model model) {
        return "socket/eycMessage";
    }

    @GetMapping("my")
    public String home(Model model) {
        model.addAttribute("eycUser", new EycUser());
        return "my";
    }

    @ApiOperation("客服列表")
    @GetMapping("innerUserList")
    public String innerUserList(Model model) {
        model.addAttribute("userType", UserTypeEnums.INNER_USER.getCode());
        return "user/userList";
    }

    @ApiOperation("年检价格配置")
    @GetMapping("inspPriceConfig")
    public String inspPriceConfig(Model model) {
        return "basedata/inspPriceConfig";
    }

    @ApiOperation("商户列表")
    @GetMapping("inspStationList")
    public String inspStationList(Model model) {
        return "basedata/inspStationList";
    }

    @ApiOperation("订单列表")
    @GetMapping("orderList")
    public String orderList(Model model) {
        return "order/orderList";
    }
    @ApiOperation("订单申请退款确认")
    @GetMapping("orderRefund")
    public String orderRefund(Model model) {
        return "order/orderRefund";
    }
    
    @ApiOperation("客户列表")
    @GetMapping("outerUserList")
    public String outerUserList(Model model) {
        model.addAttribute("userType", UserTypeEnums.OUTER_USER.getCode());
        return "user/userList";
    }
    @ApiOperation("信息发布")
    @GetMapping("publicInfo")
    public String publicInfo(Model model) {
        return "basedata/publicInfo";
    }


}
